﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Windows.Forms;
using Styx;
using Styx.Helpers;
using Styx.Logic.BehaviorTree;
using Styx.Plugins.PluginClass;

namespace SwInYUtility
{
    public class SwInYUtility : HBPlugin
    {
        public override string Name { get { return "SwInYUtility"; } }
        public override string Author { get { return "SwInY"; } }
        public override Version Version { get { return new Version(1, 0); } }
        public override void OnButtonPress() { fSettings._Instance.Show(); }
        public override bool WantButton{ get { return true; } }
        public override string ButtonText { get { return "Menu"; } }

        public override void Initialize()
        {
            Log.Write( Log.eLogType.General, "| -------- Loading -------- |");
            Settings._Instance = new Settings();
            fSettings._Instance = new fSettings();

            

            // Class Init's
            GuildInviter.Initialize();
            RareKiller.Initialize();
            Misc.Initialize();
            Glue.Initialize();
            LootFilter.Initialize();
        }

        public override void Dispose()
        {
            // Class Dispose's
            GuildInviter.Dispose();
            Misc.Dispose();
            LootFilter.Dispose();
        }

        public override void Pulse()
        {
            // Class Pulse's
            if (Settings._Instance.GuildInviter_Enabled) GuildInviter.Pulse();
            if (Settings._Instance.RareKiller_Enabled) RareKiller.Pulse();
            if (Settings._Instance.Glue_Enabled) Glue.Pulse();
        }

    }
}
